Creating a Finite-State Parser with Application Semantics

نویسندگان

  • Owen Rambow
  • Srinivas Bangalore
  • Tahir Butt
  • Alexis Nasr
  • Richard Sproat
چکیده

Parsli is a finite-state (FS) parser which can be tailored to the lexicon, syntax, and semantics of a particular application using a hand-editable declarative lexicon. The lexicon is defined in terms of a lexicalized Tree Adjoining Grammar, which is subsequently mapped to a FS representation. This approach gives the application designer better and easier control over the natural language understanding component than using an off-the-shelf parser. We present results using Parsli on an application that creates 3D-images from typed input. 1 Parsing and Application-Specific Semantics One type of Natural Language Understanding (NLU) application is exemplified by the database access problem: the user may type in free source language text, but the NLU component must map this text to a fixed set of actions dictated by the underlying application program. We will call such NLU applications “applicationsemantic NLU”. Other examples of applicationsemantic NLU include interfaces to commandbased applications (such as airline reservation systems), often in the guise of dialog systems. Several general-purpose off-the-shelf (OTS) parsers have become widely available (Lin, 1994; Collins, 1997). For application-semantic NLU, it is possible to use such an OTS parser in conjunction with a post-processor which transfers the output of the parser (be it phrase structure or dependency) to the domain semantics. In addition to mapping the parser output to application semantics, the post-processor often must also “correct” the output of the parser: the parser may be tailored for a particular domain (such as Wall Street Journal (WSJ) text), but the new domain presents linguistic constructions not found in the original domain (such as questions). It may also be the case that the OTS parser consistently misanalyzes certain lexemes because they do not occur in the OTS corpus, or occur there with different syntactic properties. While many of the parsers can be retrained, often an annotated corpus is not available in the application domain (since, for example, the application itself is still under development and there is not yet a user community). The process of retraining may also be quite complex in practice. A further disadvantage of this approach is that the postprocessor must typically be written by hand, as procedural code. In addition, the applicationsemantic NLU may not even exploit the strengths of the OTS parser, because the NLU required for the application is not only different (questions), but generally simpler (the WSJ contains very long and syntactically complex sentences which are not likely to be found as input in interactive systems, including dialog systems). This discussion suggests that we (i) need an easy way to specify application semantics for a parser and (ii) that we do not usually need the full power of a full recursive parser. In this paper, we suggest that application-semantic NLP may be better served by a lexicalized finite-state (FS) parser. We present PARSLI, a FS parser which can be tailored to the application semantics using a hand-editable declarative lexicon. This approach gives the application designer better and easier control over the NLU component. Furthermore, while the finite-state approach may not be sufficient for WSJ text (given its syntactic complexity), it is sufficient for most interactive systems, and the advantage in speed offered by FS approaches in more crucial in interactive applications. Finally, in speech-based systems, the lattice that is output from the speech recognition component can easily used as input to a FS-based parser. 2 Sample Application: WORDSEYE WORDSEYE (Coyne and Sproat, 2001) is a system for converting English text into threedimensional graphical scenes that represent that text. WORDSEYE performs syntactic and semantic analysis on the input text, producing a description of the arrangement of objects in a scene. An image is then generated from this scene description. At the core of WORDSEYE is the notion of a “pose”, which can be loosely defined as a figure (e.g. a human figure) in a configuration suggestive of a particular action. For WORDSEYE, the NLP task is thus to map from an input sentence to a representation that the graphics engine can directly interpret in terms of poses. The graphical component can render a fixed set of situations (as determined by its designer); each situation has several actors in situation-specific poses, and each situation can be described linguistically using a given set of verbs. For example, the graphical component may have a way of depicting a commercial transaction, with two humans in particular poses (the buyer and the seller), the goods being purchased, and the payment amount. In English, we have different verbs that can be used to describe this situation (buy, sell, cost, and so on). These verbs have different mappings of their syntactic arguments to the components in the graphical representation. We assume a mapping from syntax to domain semantics, leaving to lexical semantics the question of how such a mapping is devised and derived. (For many applications, such mappings can be derived by hand, with the semantic representation an ad-hoc notation.) We show a sample of such mapping in Figure 1. Here, we assume that the graphics engine of WORDSEYE knows how to depict a TRANSACTION when some of the semantic arguments of a transaction (such as CUSTOMER, ITEM, AMOUNT) are specified. We show some sample transductions in Figure 2. In the output, syntactic constituents are bracketed. Following each argument is information about its grammatical function (“GF=0” for example) and about its semantic role (ITEM for example). If a lexical item has a semantics of its own, the semantics replaces the lexical item (this is the case for verbs), otherwise the lexical item remains in place. In the case of the transitive cost, the verbal semantics in Figure 1 specifies an implicit CUSTOMER argument. This is generated when cost is used transitively, as can be seen in Figure 2. 3 Mapping Tree Adjoining Grammar to Finite State Machines What is crucial for being able to define a mapping from words to application semantics is a very abstract notion of grammatical function: in devising such a mapping, we are not interested in how English realizes certain syntactic arguments, i.e., in the phrase structure of the verbal projection. Instead, we just want to be able to refer to syntactic functions, such as subject or indirect object. Tree Adjoining Grammar (TAG) represents the entire syntactic projection from a lexeme in its elementary structures in an elementary tree; because of this, each elementary tree can be associated with a lexical item (lexicalization, (Joshi and Schabes, 1991)). Each lexical item can be associated with one or more trees which represent the lexeme’s valency; these trees are referred to as its supertags. In a derivation, substituting or adjoining the tree of one lexeme into that of another creates a direct dependency between them. The syntactic functions are labeled with integers starting with zero (to avoid discussions about names), and are retained across operations such as topicalization, dative shift and passivization. A TAG consists of a set of elementary trees of two types, initial trees and auxiliary trees. These trees are then combined using two operations, substitution and adjunction. In substitution, an initial tree is appended to a specially marked node with the same label as the initial tree’s root node. In adjunction, a non-substitution node is rewritten by an auxiliary tree, which has a specially marked frontier node called the footnode. The effect is to insert the auxiliary tree into the middle of the other tree. We distinguish two types of auxiliary trees. Adjunct auxiliary trees are used for adjuncts; they have the property that the footnode is alVerb Supertag Verb semantics Argument semantics paid A nx0Vnx1 transaction 0=Customer 1=Amount cost A nx0Vnx1 transaction 0=Item 1=Amount Implicit=Customer cost A nx0Vnx2nx1 transaction 0=Item 1=Amount 2=Customer bought, purchased A nx0Vnx1 transaction 0=Customer 1=Item socks A NXN none none Figure 1: Sample entries for a commercial transaction situation In: I bought socks Out: ( ( I ) GF=0 AS=CUSTOMER TRANSACTION ( socks ) GF=1 AS=ITEM ) In:the pajamas cost my mother-in-law 12 dollars Out: ( ( ( the ) pajamas ) GF=0 AS=ITEM TRANSACTION ( ( my ) mother-in-law ) GF=2 AS=CUSTOMER ( ( 12 ) dollars ) GF=1 AS=AMOUNT ) In: the pajamas cost 12 dollars Out: ( ( ( the ) pajamas ) GF=0 AS=ITEM TRANSACTION IMP:CUSTOMER ( ( 12 ) dollars ) GF=1 AS=AMOUNT ) Figure 2: Sample transductions generated by Parsli (“GF” for grammatical function, “AS” for argument semantics, “Imp” for implicit argument) ways a daughter node of the root node, and the label on these nodes is not, linguistically speaking, part of the projection of the lexical item of that tree. For example, an adjective will project to AdjP, but the rootand footnode of its tree will be labeled NP, since an adjective adjoins to NP. We will refer to the rootand footnode of an adjunct auxiliary tree as its passive valency structure. Note that the tree for an adjective also specifies whether it adjoins from the left (footnode on right) or right (footnode on left). Predicative auxiliary trees are projected from verbs which subcategorize for clauses. Since a verb projects to a clausal category, and has a node labeled with a clausal category on its frontier (for the argument), the resulting tree can be interpreted as an auxiliary tree, which is useful in analyzing longdistance wh-movement (Frank, 2001). To derive a finite-state transducer (FST) from a TAG, we do a depth-first traversal of each elementary tree (but excluding the passive valency structure, if present) to obtain a sequence of nonterminal nodes. For predicative auxiliary trees, we stop at the footnode. Each node becomes two states of the FST, one state representing the node on the downward traversal on the left side, the other representing the state on the upward traversal, on the right side. For leaf nodes, the two states are juxtaposed. The states are linearly connected with -transitions, with the left node state of the root node the start state, and its right node state the final state (except for predicative auxiliary trees – see above). To each non-leaf state, we add one self loop transition for each tree in the grammar that can adjoin at that state from the specified direction (i.e., for a state representing a node on the downward traversal, the auxiliary tree must adjoin from the left), labeled with the tree name. For each pair of adjacent states representing a substitution node, we add transitions between them labeled with the names of the trees that can substitute there. We output the number of the grammatical function, and the argument semantics, if any is specified. For the lexical head, we transition on the head, and output the semantics if defined, or simply the lexeme otherwise. There are no other types of leaf nodes since we do not traverse the passive valency structure of adjunct auxiliary tees. At the beginning of each FST, an -transition outputs an open-bracket, and at the end, an -transition outputs a close-bracket. The result of this phase of the conversion is a set of FSTs, one per elementary tree of the grammar. We will refer to them as “elementary FSTs”. 0 1 :( 2 A_NXG:GF=0 A_NXN:GF=0 3 :FE=Customer 4 ordered:transaction 5 A_NXG:GF=1 A_NXN:GF=1 6 :FE=Item 7 :) Figure 4: FST corresponding to TAG tree in Figure 3

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Interleaving Syntax and Semantics in an Efficient Bottom-Up Parser

z Abstract We describe an eecient bottom-up parser that in-terleaves syntactic and semantic structure building. Two techniques are presented for reducing search by reducing local ambiguity: Limited left-context constraints are used to reduce local syntactic ambiguity, and deferred sortal-constraint application is used to reduce local semantic ambiguity. We experimentally evaluate these techniqu...

متن کامل

Parsing and Validation of full CSP-M Specifications using Haskell and Prolog (Abstract)

CSP is a process algebra defined by Hoare. The first semantics associated with CSP was a denotational semantics in terms of traces, failures and divergences. Later an operational semantics was added [7]. CSP has been applied in many applications, notably for security protocols [6]. The most widely used tools today are fdr [2] and ProBE [3]. These tools use a syntax called machine readable CSP (...

متن کامل

Interleaving Syntax and Semantics in an Effecient Bottom-Up Parser

We describe an efficient bottom-up parser that in-terleaves syntactic and semantic structure building. Two techniques are presented for reducing search by reducing local ambiguity: Limited left-context constraints are used to reduce local syntactic ambiguity, and deferred sortal-constraint application is used to reduce local semantic ambiguity. We experimentally evaluate these techniques , and ...

متن کامل

Generalized LR parsing and the shuffle operator

We adapt Tomita’s Generalized LR algorithm to languages generated by context-free grammars enriched with a shuffle operator. The change involves extensions to the underlying handle-finding finite automaton, construction of parser tables, and the necessary optimizations in constructing a deterministic parser. Our system is motivated by an application from artificial intelligence plan recognition...

متن کامل

Application of Frame Semantics to Teaching Seeing and Hearing Vocabulary to Iranian EFL Learners

A term in one language rarely has an absolute synonymous meaning in the same language; besides, it rarely has an equivalent meaning in an L2. English synonyms of seeing and hearing are particularly grammatically and semantically different. Frame semantics is a good tool for discovering differences between synonymous words in L2 and differences between supposed L1 and L2 equivalents. Vocabulary ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2002